import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'
import HomeView from '../views/HomeView.vue'

const routes: Array<RouteRecordRaw> = [
  {
    path: '/',
    name: 'Home',
    meta: {
      title: '首页'
    },
    component: HomeView,
    children:[
    {
      path: '/about',
      name: 'About',
      meta: {
        title: '组织架构'
      },
      component: () => import('../views/AboutView.vue')
    },
    {
      path: '/user',
      name: 'User',
      meta: {
        title: '平台用户'
      },
      component: () => import('../views/TablePage.vue')
    }
    ]
  },

]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
